package src.main.StructuralPatterns.Bridge;

public class Client {
    public static void main(String[] args) {
        // 创建设备
        Device tv = new TV();
        Device radio = new Radio();

        // 创建遥控器
        RemoteControl tvRemote = new AdvanceRemote(tv);
        RemoteControl radioRemote = new BasicRemote(radio);

        System.out.println("control tv");
        tvRemote.powerToggle();
        tvRemote.channelUp();
        tvRemote.volumeUp();

        tv.printStatus();
        ((AdvanceRemote) tvRemote).mute();

        System.out.println("control radio");
        radioRemote.powerToggle();
        radioRemote.channelUp();
        radioRemote.volumeUp();
        radio.printStatus();
    }
}
